home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Presentations
/
Presentations ’94
/
Timothy Knox
/
Help
/
Help Files
/
System files
/
HelpToStrict
< prev
next >
Wrap
Text File
|
1994-06-24
|
812b
|
20 lines
{•••••••• Some code to turn Help into a really strict language •••••••••}
{•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••}
{•••NB: You should also paste the "Strict.res" ressources in "Paresseux"}
{••• First of all, let's modify lambda }
(coerce 'lambda 6) ;turns lambda into a normal symbol
(=! system:lambda lambda) ;get lambda code in system:lambda symbol
(defmacro (lambda | l)
`(setstrict (system:lambda ,@l) %1111111111111111))
;lambda creates now strict closures !
(coerce 'system:lambda 10) ;turns system:lambda into a keyword
{••• Now define…}
(coerce 'define 6)
(=! system:define define)
(defmacro (define f | b)
(cond (cons? f) `(system:define ,(0 f) (lambda ,(-1 f) ,@b))
`(system:define ,f ,@b)))
(coerce 'system:define 10)